/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'

const nestedRouter = {
  path: '/basicInfo',
  component: Layout,
  redirect: '/basicInfo/menu1/menu1-1',
  name: 'basicInfo',
  meta: {
    title: 'basicInfo',
    icon: 'user'
  },
  children: [{
    path: 'goods',
    component: () =>
                import('@/views/basicInfo/goods/index'), // Parent router-view
    name: 'goods',
    meta: {
      title: 'goods'
    },
    redirect: '/basicInfo/goods/addGoods',
    children: [{
      // 商品档案
      path: 'addGoods',
      component: () =>
                        import('@/views/basicInfo/goods/addGoods/goodsList'),
      name: 'addGoods',
      meta: {
        title: 'addGoods'
      }
    }, {
      path: 'goodsType',
      component: () =>
                        import('@/views/basicInfo/goods/goodsType'),
      name: 'goodsType',
      meta: {
        title: 'goodsType'
      }
    },
    {
      // 单位档案
      path: 'unit',
      component: () =>
                        import('@/views/basicInfo/goods/unit/unitList'),
      name: 'unit',
      meta: {
        title: 'unit'
      }
    }, {
      path: 'goodsSpec',
      component: () =>
        import('@/views/basicInfo/dict/dict/dictList'),
      name: 'goodsSpec',
      meta: {
        title: 'goodsSpec'
      }
    }
    ]
  },
  {
    path: 'platUser',
    component: () =>
                import('@/views/basicInfo/platUser/index'), // Parent router-view
    name: 'platUser',
    meta: {
      title: 'platUser'
    },
    redirect: '/basicInfo/platuser/party',
    children: [{
      path: 'party',
      component: () =>
                        import('@/views/basicInfo/platUser/partyManage/partyList'),
      name: 'party',
      meta: {
        title: 'partyManage'
      }
    },
    {
      path: 'role',
      component: () =>
                        import('@/views/basicInfo/platUser/roleManage/roleList'),
      name: 'role',
      meta: {
        title: 'roleManage'
      }
    },
    {
      path: 'partyGroup',
      component: () =>
                        import('@/views/basicInfo/platUser/partyGroupManage/partyGroupList'),
      name: 'partyGroup',
      meta: {
        title: 'partyGroup'
      }
    },
    {
      path: 'department',
      component: () =>
                        import('@/views/basicInfo/platUser/department/departmentList'),
      name: 'department',
      meta: {
        title: 'department'
      }
    },
    {
      path: 'team',
      component: () =>
                        import('@/views/basicInfo/platUser/team/teamList'),
      name: 'team',
      meta: {
        title: 'team'
      }
    }
    ]
  },
  {
    // 托运方管理
    path: 'shipment',
    component: () =>
                import('@/views/basicInfo/shipment/index'),
    name: 'shipment',
    meta: {
      title: 'shipment'
    },
    redirect: '/basicInfo/shipment/index',
    children: [{
      // 入驻商管理
      path: 'shipmentManage',
      component: () =>
                        import('@/views/basicInfo/shipment/shipmentManage/shipmentList'),
      name: 'shipmentManage',
      meta: {
        title: 'shipmentManage'
      }
    },
    {
      // 新增入驻商
      path: 'addShipmentForm',
      component: () => import('@/views/basicInfo/shipment/shipmentForm/addShipmentForm'),
      hidden: true,
      name: 'addShipmentForm',
      meta: {
        title: 'addShipmentForm'
      }
    },
    {
      // 编辑入驻商
      path: 'editShipmentForm',
      component: () =>
                        import('@/views/basicInfo/shipment/shipmentForm/editShipmentForm'),
      hidden: true,
      name: 'editShipmentForm',
      meta: {
        title: 'editShipmentForm'
      }
    },
    {
      // 基本信息（入驻商本人登录）
      path: 'selfShipmentForm',
      component: () =>
                        import('@/views/basicInfo/shipment/shipmentForm/selfShipmentForm'),
      name: 'selfShipmentForm',
      meta: {
        title: 'selfShipmentForm'
      }
    },
    {
      // 发货企业管理
      path: 'shipmentCompanyManage',
      component: () =>
                        import('@/views/basicInfo/shipment/shipmentCompanyManage/shipmentCompanyList'),
      name: 'shipmentCompanyManage',
      meta: {
        title: 'shipmentCompanyManage'
      }
    },
    {
      // 新增发货企业
      path: 'addShipmentCompanyForm',
      component: () =>
                        import('@/views/basicInfo/shipment/shipmentForm/addShipmentCompanyForm'),
      hidden: true,
      name: 'addShipmentCompanyForm',
      meta: {
        title: 'addShipmentCompanyForm'
      }
    },
    {
      // 编辑发货企业
      path: 'editShipmentCompanyForm',
      component: () =>
                        import('@/views/basicInfo/shipment/shipmentForm/editShipmentCompanyForm'),
      hidden: true,
      name: 'editShipmentCompanyForm',
      meta: {
        title: 'editShipmentCompanyForm'
      }
    },
    {
      // 基本信息（企业登录）
      path: 'selfCompanyShipmentForm',
      component: () =>
                        import('@/views/basicInfo/shipment/shipmentForm/selfCompanyShipmentForm'),
      name: 'selfCompanyShipmentForm',
      meta: {
        title: 'selfCompanyShipmentForm'
      }
    }
    ]
  },
  {
    path: 'driver',
    component: () =>
                import('@/views/basicInfo/driver/index'), // Parent router-view
    name: 'driver',
    meta: {
      title: 'driver'
    },
    redirect: '/basicInfo/driver/index',
    children: [{
      // 车队管理
      path: 'driverTeamManage',
      component: () =>
                        import('@/views/basicInfo/driver/driverTeamManage/driverTeamList'),
      name: 'driverTeamManage',
      meta: {
        title: 'driverTeamManage'
      }
    },
    {
      // 新增车队
      path: 'addDriverTeamForm',
      component: () =>
                        import('@/views/basicInfo/driver/driverTeamManage/addDriverTeamForm'),
      hidden: true,
      name: 'addDriverTeamForm',
      meta: {
        title: 'addDriverTeamForm'
      }
    },
    {
      // 编辑车队
      path: 'editDriverTeamForm',
      component: () =>
                        import('@/views/basicInfo/driver/driverTeamManage/editDriverTeamForm'),
      hidden: true,
      name: 'editDriverTeamForm',
      meta: {
        title: 'editDriverTeamForm'
      }
    },
    {
      // 车队详情
      path: 'infoDriverTeamForm',
      component: () =>
                        import('@/views/basicInfo/driver/driverTeamManage/infoDriverTeamForm'),
      hidden: true,
      name: 'infoDriverTeamForm',
      meta: {
        title: 'infoDriverTeamForm'
      }
    },
    {
      // 基本信息（车队本人登录）
      path: 'selfDriverTeamForm',
      component: () =>
                        import('@/views/basicInfo/driver/driverTeamManage/selfDriverTeamForm'),
      name: 'selfDriverTeamForm',
      meta: {
        title: 'selfDriverTeamForm'
      }
    },
    {
      // 司机管理
      path: 'driverManage',
      component: () =>
                        import('@/views/basicInfo/driver/driverManage/driverList'),
      name: 'driverManage',
      meta: {
        title: 'driverManage'
      }
    },
    {
      // 新增司机
      path: 'addDriverForm',
      component: () =>
                        import('@/views/basicInfo/driver/driverManage/addDriverForm'),
      hidden: true,
      name: 'addDriverForm',
      meta: {
        title: 'addDriverForm'
      }
    },
    {
      // 编辑司机
      path: 'editDriverForm',
      component: () =>
                        import('@/views/basicInfo/driver/driverManage/editDriverForm'),
      hidden: true,
      name: 'editDriverForm',
      meta: {
        title: 'editDriverForm'
      }
    },
    {
      // 司机详情
      path: 'infoDriverForm',
      component: () =>
                        import('@/views/basicInfo/driver/driverManage/infoDriverForm'),
      hidden: true,
      name: 'infoDriverForm',
      meta: {
        title: 'infoDriverForm'
      }
    },
    {
      // 基本信息（司机本人登录）
      path: 'selfDriverForm',
      component: () =>
                        import('@/views/basicInfo/driver/driverManage/selfDriverForm'),
      name: 'selfDriverForm',
      meta: {
        title: 'selfDriverForm'
      }
    },
    {
      path: 'vehicle',
      component: () =>
                        import('@/views/basicInfo/driver/platVehicle/vehicleList'),
      name: 'vehicle',
      meta: {
        title: 'platVehicle'
      }
    },
    {
      path: 'vehicleMap',
      component: () =>
                        import('@/views/basicInfo/menu3/vehicleMap'),
      name: 'vehicleMap',
      meta: {
        title: 'vehicleMap'
      }
    }
      /*,
                                  {
                                    path: 'vehicleTrack',
                                    component: () => import('@/views/basicInfo/menu3/vehicleTrack'),
                                    name: 'vehicleTrack',
                                    meta: {
                                      title: 'vehicleTrack'
                                    }
                                  }*/
    ]
  },
  {
    path: 'vehicleService',
    component: () =>
                import('@/views/basicInfo/vehicleService/index'), // Parent router-view
    name: 'vehicleService',
    meta: {
      title: 'vehicleService'
    },
    redirect: '/Basic_information/vehicleService/vehicleInsurance',
    children: [{
      // 车辆保险
      path: 'vehicleInsurance',
      component: () =>
                        import('@/views/basicInfo/vehicleService/vehicleInsurance/vehicleInsuranceList'),
      name: 'vehicleInsurance',
      meta: {
        title: 'vehicleInsurance'
      }
    },
    {
      // 车辆维修
      path: 'vehicleRepair',
      component: () =>
                        import('@/views/basicInfo/vehicleService/vehicleRepair/vehicleRepairList'),
      name: 'vehicleRepair',
      meta: {
        title: 'vehicleRepair'
      }
    },
    {
      path: 'vehicleViolation',
      component: () =>
                        import('@/views/basicInfo/vehicleService/vehicleViolation/vehicleViolationList'),
      name: 'vehicleViolation',
      meta: {
        title: 'vehicleViolation'
      }
    },
    {
      path: 'vehicleAccident',
      component: () =>
                        import('@/views/basicInfo/vehicleService/vehicleAccident/vehicleAccidentList'),
      name: 'vehicleAccident',
      meta: {
        title: 'vehicleAccident'
      }
    }
    ]
  }, {
    path: 'dict',
    component: () =>
                import('@/views/basicInfo/dict/index'), // Parent router-view
    name: 'dict',
    meta: {
      title: 'dict'
    },
    redirect: '/basicInfo/dict/index',
    children: [{
      path: 'shipType',
      component: () =>
                        import('@/views/basicInfo/dict/dict/dictList'),
      name: 'shipType',
      meta: {
        title: 'shipType'
      }
    }, {
      path: 'vehicleClassification',
      component: () =>
                        import('@/views/basicInfo/dict/dict/dictList'),
      name: 'vehicleClassification',
      meta: {
        title: 'vehicleClassification'
      }
    },
    {
      path: 'vehicleLength',
      component: () =>
                        import('@/views/basicInfo/dict/dict/dictList'),
      name: 'vehicleLength',
      meta: {
        title: 'vehicleLength'
      }
    },
    {
      path: 'vehicleWidth',
      component: () =>
                        import('@/views/basicInfo/dict/dict/dictList'),
      name: 'vehicleWidth',
      meta: {
        title: 'vehicleWidth'
      }
    },
    {
      path: 'vehicleHigh',
      component: () =>
                        import('@/views/basicInfo/dict/dict/dictList'),
      name: 'vehicleHigh',
      meta: {
        title: 'vehicleHigh'
      }
    },
    {
      path: 'vehicleZhoushu',
      component: () =>
                        import('@/views/basicInfo/dict/dict/dictList'),
      name: 'vehicleZhoushu',
      meta: {
        title: 'vehicleZhoushu'
      }
    },
    {
      path: 'vehicleTonnage',
      component: () =>
                        import('@/views/basicInfo/dict/dict/dictList'),
      name: 'vehicleTonnage',
      meta: {
        title: 'vehicleTonnage'
      }
    },
    {
      path: 'vehicleCube',
      component: () =>
                        import('@/views/basicInfo/dict/dict/dictList'),
      name: 'vehicleCube',
      meta: {
        title: 'vehicleCube'
      }
    },
    {
      path: 'extraFeeType',
      component: () =>
                        import('@/views/basicInfo/dict/dict/dictList'),
      name: 'extraFeeType',
      meta: {
        title: 'extraFeeType'
      }
    },
    {
      path: 'bank',
      component: () =>
                        import('@/views/basicInfo/dict/dict/dictList'),
      name: 'bank',
      meta: {
        title: 'bank'
      }
    }
    ]
  },
  {
    // 银行卡管理
    path: 'bankCardManage',
    component: () =>
                import('@/views/basicInfo/bankCard/bankCardList'),
    name: 'bankCardManage',
    meta: {
      title: 'bankCardManage'
    }
  },
  {
    // 车站信息
    path: 'station',
    component: () =>
                import('@/views/basicInfo/station/stationList'),
    name: 'station',
    meta: {
      title: 'station'
    }
  }
  ]
}

export default nestedRouter
